feat(format): general experimental-feature mechanism#7670
Draft
wjones127 wants to merge 1 commit into
Draft
Conversation
Proposes and implements a general mechanism for shipping experimental format features without burning a permanent feature-flag bit per experiment. Policy (design doc) and the proto/format change are together so they can be reviewed and voted on as one. Mechanism: - Reserve one persisted bit, FLAG_EXPERIMENTAL (1 << 6, reusing the old first FLAG_UNKNOWN bit), meaning "this dataset uses experimental feature(s)". It is the fail-closed anchor: pre-mechanism libraries reject the dataset on the bit alone. - Carry feature identities in free-form manifest string lists (experimental_reader_features / experimental_writer_features). New libraries admit a dataset iff they understand every declared name. - A compile-time registry (known_experimental_features) lists the experiments a build understands, gated by each experiment's Cargo feature; a default build understands none and so rejects any experimental dataset. This keeps experiments free-flowing (unbounded string namespace, mint/abandon at will) while the bitmap stays conservative (a bit is spent only at graduation). Design, graduation/lifecycle, alternatives, and prior art (Delta Lake table features) in rust/lance-table/design/experimental_feature_flags.md. can_read_dataset / can_write_dataset now take the declared experimental feature list alongside the flags (two internal callers updated). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Important This PR touches the Lance format specification. Substantive changes to the format specification — the If this is a meaningful format change:
|
This was referenced Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposes and implements a general mechanism for shipping experimental
format features without spending a scarce, permanent feature-flag bit per
experiment. The policy proposal and the proto/format change are in one PR so the
PMC can review and vote on them together.
The problem
Feature flags are two
u64bitmaps with a linear "first unknown bit" boundary.That's fine for stable features but hostile to experimentation:
bit can't be reused, because some dataset may have written it. Experimental
churn permanently pollutes a scarce, shared namespace.
The mechanism
FLAG_EXPERIMENTAL(1 << 6, reusing the oldfirst
FLAG_UNKNOWNbit — safe to repurpose, since writing it always made adataset unreadable so none exist in the wild). It means "this dataset uses
experimental feature(s)" and is the fail-closed anchor: libraries that
predate an experiment reject the dataset on the bit alone.
experimental_reader_features/experimental_writer_features. New librariesadmit a dataset iff they understand every declared name.
known_experimental_features) lists what a buildunderstands, gated per experiment by its Cargo feature. A default build
understands none, so it rejects any experimental dataset — the conservative
default.
Result: experiments are free-flowing (unbounded string namespace, mint and
abandon at will) while the bitmap stays conservative (a permanent bit is
spent only when a feature graduates).
The bit is load-bearing precisely because a string list alone is unsafe: an old
reader silently ignores an unknown manifest field and would misread experimental
data. The bit forces rejection; the strings do precise capability negotiation.
Contents
rust/lance-table/design/experimental_feature_flags.md— the proposal:design, admission algorithm, graduation/lifecycle, alternatives considered
(dedicated-bit-per-experiment, string-list-without-bit, feature branch), and
prior art (Delta Lake table features).
protos/table.proto—experimental_reader_features = 22/experimental_writer_features = 23onManifest, plus doc of bit1 << 6.Backwards compatible.
feature_flags.rs—FLAG_EXPERIMENTAL, the registry, and admission checks;can_read_dataset/can_write_datasetnow take the declared feature list.Manifeststruct + proto conversions +apply_feature_flagswiring; the twointernal admission callers updated.
Relationship to #7641
The action-based-transactions skeleton (#7641) currently claims a dedicated
FLAG_ACTION_TRANSACTIONSbit. Once this lands, #7641 should adopt thismechanism instead — set
FLAG_EXPERIMENTAL+ list"action-transactions",register the name under its Cargo feature, and free the dedicated bit. This PR
should land first.
Open questions
bindings for introspection.
window or requires a rewrite.
🤖 Generated with Claude Code